@custom-selector :--heading h1, h2, h3, h4, h5, h6;

.content {

    &:not(:last-child) {
        margin-bottom: 1.5em;
    }

    &.is-small {
        font-size: .75rem;
    }

    &.is-large {
        font-size: 1.5rem;
    }

    & h1 {
        font-size: 2em;
        margin-bottom: .5em;
    }

    & h2 {
        font-size: 1.75em;
        margin-bottom: .574em;
        &:not(:first-child) {
           margin-top: 1.1428em;
        }
    }

    & h3 {
        font-size: 1.5em;
        margin-bottom: .6666em;

        &:not(:first-child) {
            margin-top: 1.3333em;
        }
    }

    & h4 {
        font-size: 1.25em;
        margin-bottom: .8em;
    }

    & h5 {
        font-size: 1.125em;
        margin-bottom: .8888em;
    }

    & h6 {
        font-size: 1em;
        margin-bottom: 1em;
    }

    & figure {
        margin-left: 2em;
        margin-right: 2em;
        text-align: center;

        &:not(:first-child) {
            margin-top: 2em;
        }

        &:not(:last-child) {
            margin-bottom: 2em;
        }

        & img {
            display: inline-block;
        }
    }

    & pre {
        background-color: whitesmoke;
        padding: 1.5em;
        overflow-x: auto;
        white-space: pre;
        word-wrap: normal;

        &:not(:last-child) {
            margin-bottom: 1em;
        }
    }

    & table {
        width: 100%;
        border-collapse: collapse;
        border-spacing: 0;

        &:not(:last-child) {
            margin-bottom: 1em;
        }

        & th, & td {
            text-align: left;
            padding: .5em .75em;
        }

        & thead tr {
            border-bottom: 2px solid gray(219);
        }

        & tbody tr {
            border-bottom: 1px solid gray(219);
            &:last-child {
                border-bottom-width: 0;
            }
        }

    }

    & blockquote {
        background-color: whitesmoke;
        padding: 2em;
        border-left: 5px solid gray(219);
    }

    & ul {
        list-style: disc outside;
        margin-top: 1em;
        margin-left: 2em;
    }

    & ol {
        margin-top: 1em;
        margin-left: 2em;
    }

    & dl {
        margin-top: 1em;

        &:not(:last-child) {
            margin-bottom: 1em;
        }
    }


    & :--heading {
        font-weight: 400;
        color: gray(54);
        line-height: 1.125;
    }

    & p:not(:last-child), & ul:not(:last-child), & ol:not(:last-child),
    & blockquote:not(:last-child) {
        margin-bottom: 1em;
    }

    & dd {
        margin-left: 2em;
    }
}
